package com.czeczek.domain;

import java.util.ArrayList;
import java.util.List;

public class IndicatorDim {
	private long id;
	private String name;
	private String className;
	private List<IndicatorParamDim> parameters;
	
	public IndicatorDim() {
		parameters = new ArrayList<IndicatorParamDim>();
	}
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	
	public List<IndicatorParamDim> getParameters() {
		return parameters;
	}
	
	public void setParameters(List<IndicatorParamDim> parameters) {
		this.parameters = parameters;
	}
	
	@Override
	public String toString() {
		return "IndicatorDim [id=" + id + ", name=" + name + ", className="
				+ className + ", parameters=" + parameters + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((className == null) ? 0 : className.hashCode());
		result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((parameters == null) ? 0 : parameters.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		IndicatorDim other = (IndicatorDim) obj;
		if (className == null) {
			if (other.className != null)
				return false;
		} else if (!className.equals(other.className))
			return false;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (parameters == null) {
			if (other.parameters != null)
				return false;
		} else if (!parameters.equals(other.parameters))
			return false;
		return true;
	}
	
	
}
